//
//  UIImageView+NYExtension.m
//  BS
//
//  Created by neal on 15/8/17.
//  Copyright (c) 2015年 Neal. All rights reserved.
//

#import "UIImageView+NYExtension.h"
#import <UIImageView+WebCache.h>

@implementation UIImageView (NYExtension)
- (void)setHeaderImageWithUrl:(NSString *)url
{
    UIImage *placeholder = [[UIImage imageNamed:@"defaultUserIcon"] clipImage];
    
    [self sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:placeholder completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
        if (image== nil) {
            return ;
        }
        self.image = [image clipImage];
    }];
    
}
@end
